﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ElementumForever.Interfaces;

namespace ElementumForever.CommandPattern
{
    class ChangeScaleCommand:ChangeXYCommand
    {
        public ChangeScaleCommand(IEntityProperty entity, float oldScaleX, float newScaleX, float oldScaleY, float newScaleY) 
            : base(entity,oldScaleX,newScaleX,oldScaleY,newScaleY) { }

        public override void Execute(Interfaces.IsceneBuilder modeler)
        {
            entity.ScaleX = newP.X;
            entity.ScaleY = newP.Y;
        }

        public override void UnExecute(Interfaces.IsceneBuilder modeler)
        {
            entity.ScaleX = oldP.X;
            entity.ScaleY = oldP.Y;
        }
    }
}
